package corba.airlineServer;


/**
* corba/corba.airlineServer/FlightHelper.java .
* ��IDL-to-Java ������ (����ֲ), �汾 "3.2"���
* ��AirlineServant.idl
* 2014��4��27�� ������ ����01ʱ56��06�� CST
*/

abstract public class FlightHelper
{
  private static String  _id = "IDL:corba/corba.airlineServer/Flight:1.0";

  public static void insert (org.omg.CORBA.Any a, corba.airlineServer.Flight that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  public static corba.airlineServer.Flight extract (org.omg.CORBA.Any a)
  {
    return read (a.create_input_stream ());
  }

  private static org.omg.CORBA.TypeCode __typeCode = null;
  private static boolean __active = false;
  synchronized public static org.omg.CORBA.TypeCode type ()
  {
    if (__typeCode == null)
    {
      synchronized (org.omg.CORBA.TypeCode.class)
      {
        if (__typeCode == null)
        {
          if (__active)
          {
            return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
          }
          __active = true;
          org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [11];
          org.omg.CORBA.TypeCode _tcOf_members0 = null;
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[0] = new org.omg.CORBA.StructMember (
            "flightNumber",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[1] = new org.omg.CORBA.StructMember (
            "airline",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[2] = new org.omg.CORBA.StructMember (
            "deptCity",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[3] = new org.omg.CORBA.StructMember (
            "destCity",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[4] = new org.omg.CORBA.StructMember (
            "deptAirport",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[5] = new org.omg.CORBA.StructMember (
            "arriAirport",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[6] = new org.omg.CORBA.StructMember (
            "deptTime",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[7] = new org.omg.CORBA.StructMember (
            "arriTime",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[8] = new org.omg.CORBA.StructMember (
            "plane",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[9] = new org.omg.CORBA.StructMember (
            "seatClass",
            _tcOf_members0,
            null);
          _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
          _members0[10] = new org.omg.CORBA.StructMember (
            "price",
            _tcOf_members0,
            null);
          __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (corba.airlineServer.FlightHelper.id (), "Flight", _members0);
          __active = false;
        }
      }
    }
    return __typeCode;
  }

  public static String id ()
  {
    return _id;
  }

  public static corba.airlineServer.Flight read (org.omg.CORBA.portable.InputStream istream)
  {
    corba.airlineServer.Flight value = new corba.airlineServer.Flight ();
    value.flightNumber = istream.read_string ();
    value.airline = istream.read_string ();
    value.deptCity = istream.read_string ();
    value.destCity = istream.read_string ();
    value.deptAirport = istream.read_string ();
    value.arriAirport = istream.read_string ();
    value.deptTime = istream.read_string ();
    value.arriTime = istream.read_string ();
    value.plane = istream.read_string ();
    value.seatClass = istream.read_string ();
    value.price = istream.read_string ();
    return value;
  }

  public static void write (org.omg.CORBA.portable.OutputStream ostream, corba.airlineServer.Flight value)
  {
    ostream.write_string (value.flightNumber);
    ostream.write_string (value.airline);
    ostream.write_string (value.deptCity);
    ostream.write_string (value.destCity);
    ostream.write_string (value.deptAirport);
    ostream.write_string (value.arriAirport);
    ostream.write_string (value.deptTime);
    ostream.write_string (value.arriTime);
    ostream.write_string (value.plane);
    ostream.write_string (value.seatClass);
    ostream.write_string (value.price);
  }

}
